class Character < ActiveRecord::Base
  belongs_to :race
  belongs_to :chrclass
  belongs_to :guildrank
  has_many :item_drops
  has_many :attendances
  has_many :witness
  validates_uniqueness_of :name
  #validates_associated :race, :chrclass, :guildrank
  validates_presence_of :name, :race, :chrclass, :guildrank
  #Name must contain no white space and at least 1 character
  validates_format_of :name, :with => /^\A\S+\Z/
end
